package controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import modelo.Aseguradora;

import vista.VMenu;


public class CVMenu implements ActionListener {
     
	private VMenu vmenu;
    
	private CVAseguradora cVAseguradora;
	private CVAdministrador cVAdministrador;
	private CVAuto cVAuto;
	private CVCliente cVCliente;
	private CVCorredor cVCorredor;
	private CVSiniestro cVSiniestro;
	private CVPoliza cVPoliza;
	private Aseguradora aseguradora;
	private CVInspeccion cVInspeccion;
	private CVPerito cVPerito;
	private CVTaller cVTaller;
	private CVOrdenReparacion cVOrdenReparacion;
	private CVReporteModAutoSiniestroso cVReporteModAutoSiniestroso;
	
	
	
     public CVMenu(){
    	 
    	 super();
    	 vmenu = new VMenu();
    	 vmenu.setLocationRelativeTo(null);
    	 vmenu.AgregarListenerMenu(this);
    	 vmenu.setVisible(true);
    
     }

     
	@Override
	public void actionPerformed(ActionEvent e) {
		
		if(e.getActionCommand().equalsIgnoreCase("Aseguradora")){
			
			this.vmenu.setVisible(true);
			
			CVAseguradora cvaseguradora = new CVAseguradora();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Gestion de Usuarios")){
		
			this.vmenu.setVisible(true);
			CVAdministrador cVAdministrador = new CVAdministrador();
		
		}else if(e.getActionCommand().equalsIgnoreCase("Siniestros por Modelo")){
		
			this.vmenu.setVisible(true);
			CVReporteModAutoSiniestroso cVReporteModAutoSiniestroso = new CVReporteModAutoSiniestroso();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Orden de Reparacion")){
		
			this.vmenu.setVisible(true);
			CVOrdenReparacion cVOrdenReparacion = new CVOrdenReparacion();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Corredor")){
		
			this.vmenu.setVisible(true);
			CVCorredor cVCorredor = new CVCorredor();
		
		}  else if(e.getActionCommand().equalsIgnoreCase("Taller")){
		
			this.vmenu.setVisible(true);
			
			CVTaller cVTaller = new CVTaller();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Perito")){
		
			this.vmenu.setVisible(true);
			
			CVPerito cVPerito = new CVPerito();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Auto")){
		
			this.vmenu.setVisible(true);
			
			CVAuto cVAuto = new CVAuto();
		
		}  else if(e.getActionCommand().equalsIgnoreCase("Poliza")){
		
			this.vmenu.setVisible(true);
			
			cVPoliza = new CVPoliza();
		
		}  else if(e.getActionCommand().equalsIgnoreCase("Cliente")){
			
			this.vmenu.setVisible(true);
			
			CVCliente cvcliente = new CVCliente();
		
		} else if(e.getActionCommand().equalsIgnoreCase("Siniestro")){
			
			this.vmenu.setVisible(true);
			
			CVSiniestro cVSiniestro = new CVSiniestro(aseguradora);

			
		}else if(e.getActionCommand().equalsIgnoreCase("Polizas Por Tipo")){
			
			this.vmenu.setVisible(true);
			
			CVReporteEmisionPolizas cVReporteEmisionPolizas = new CVReporteEmisionPolizas();

			
		}else if(e.getActionCommand().equalsIgnoreCase("Inspeccion")){
			
			
			CVInspeccion cVInspeccion = new CVInspeccion();

			
		} else if (e.getActionCommand().equalsIgnoreCase("Salir")){
		
			System.exit(0);
		}
	} 
	  
}
